import request from '@/utils/request'

export default{
    //条件查询分页
    pageList(pageNum,pageSize,searchObj){
        return request({
            url: `/honor/selectHonorPage/${pageNum}/${pageSize}`,
            method: 'post',
            //使用json格式传递 写法data：searchObj
            //使用j普通格式传递 写法params：searchObj
            data:searchObj
          })
    },
    getPlayerHonorList(){
        return request({
            url: `/honor/getPlayerHonorList`,
            method: 'get'
            //使用json格式传递 写法data：searchObj
            //使用j普通格式传递 写法params：searchObj

          })
    },
    getHonorByPlayer(playerId){
        return request({
            url: `/honor/getHonorByPlayer`,
            method: 'post',
            params:{
                playerId :playerId
            }

          })
    },

    getPlayerHonorPage(pageNum,pageSize,searchObj){
        return request({
            url: `/honor/getPlayerHonorPage/${pageNum}/${pageSize}`,
            method: 'post',
            //使用json格式传递 写法data：searchObj
            //使用j普通格式传递 写法params：searchObj
            data:searchObj
          })
    },

    removeHonorId(id){
        return request({
            url: `/honor/deleteHonorById/${id}`,
            method: 'delete',
          })

    },

    saveHonor(honor){
        return request({
            url: `/honor/insertHonor`,
            method: 'post',
            data:honor
          })
    },

    getHonorById(id){
        return request({
            url: `/honor/getHonorById/${id}`,
            method: 'get',
          })
    },

    updateHonor(honor){
        return request({
            url: `/honor/updateHonor`,
            method: 'post',
            data:honor
          })
    },

    batchRemove(idList) {
        return request({
          url: `/honor/removeBatch`,
          method: `delete`,
          data: idList
        })
    },

    updatePlayerHonor(playerHonor){
        return request({
            url: `/honor/updatePlayerHonor`,
            method: `post`,
            data: playerHonor
          })
    },

    insertPlayerHonor(playerHonor){
        return request({
            url: `/honor/insertPlayerHonor`,
            method: `post`,
            data: playerHonor
          })
    },

    findHonorCount(){
        return request({
            url: `/honor/findHonorCount`,
            method: `get`
          })
    },

    getClueHonor(){
        return request({
            url: `/honor/getClueHonor`,
            method: `get`
          })
    }
    

}